<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/bizappproject/ccd_report/Ccd_Report.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/bizappproject/ccd_report/Ccd_Report.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "Ccd_Report",
        setup() {
            const table = ref({
                key: "Id",
                footer: "Foots",
                cnName: "CCD结单",
                name: "ccd_report/Ccd_Report",
                newTabEdit: false,
                url: "/Ccd_Report/",
                sortName: "Id"
            });
            const editFormFields = ref({"DianduNo":"","Repoter":"","DeviceNo":"","DoneQty":"","SelectGapYN":"","ProductId":"","Spec":"","Grade":"","IncomeQty":"","IncomeWeight":"","OkQty":"","OkQtyA":"","OkQtyB":"","OkQtyC":"","OkNoGapQty":"","AppearanceNgQty":"","AppearanceNgQtyA":"","AppearanceNgQtyB":"","AppearanceNgQtyC":"","AppearanceNgNoGapQty":"","SizeNgQty":"","GeometryNgQty":"","FormNgQty":"","GongcanQty":"","LossQty":"","ScrapRecord":"","JudgeResult":"","QualifiedRate":"","AppearanceNgRate":"","SizeNgRate":"","GongCanRate":"","LossRate":"","Remarks":""});
            const editFormOptions = ref([[{"title":"电镀号","required":true,"field":"DianduNo","type":"selectTable"},
                               {"title":"结单人","required":true,"field":"Repoter","type":"text"},
                               {"dataKey":"Ccd_DeviceNo","data":[],"title":"设备号","required":true,"field":"DeviceNo","type":"select"},
                               {"dataKey":"enabled","data":[],"title":"是否分档","required":true,"field":"SelectGapYN","type":"select"},
                               {"title":"结单总数量（pcs）","required":true,"field":"DoneQty","disabled":true,"type":"number"}],
                              [{"title":"产品代码","required":true,"field":"ProductId","disabled":true},
                               {"title":"产品规格","required":true,"field":"Spec","disabled":true},
                               {"title":"产品性能","required":true,"field":"Grade","disabled":true},
                               {"title":"来料总数（pcs）","required":true,"field":"IncomeQty","disabled":true,"type":"number"},
                               {"title":"来料重量（kg）","required":true,"field":"IncomeWeight","disabled":true,"type":"decimal"}],
                              [{"title":"合格不分档总数量","required":true,"field":"OkNoGapQty","type":"number"},
                               {"title":"合格上档数量（pcs）","required":true,"field":"OkQtyA","type":"number"},
                               {"title":"合格中档数量（pcs）","required":true,"field":"OkQtyB","type":"number"},
                               {"title":"合格下档数量（pcs）","required":true,"field":"OkQtyC","type":"number"},
                               {"title":"合格总数量（pcs）","required":true,"field":"OkQty","disabled":true,"type":"number"}],
                              [{"title":"外观NG不分档总数量","required":true,"field":"AppearanceNgNoGapQty","type":"number"},
                               {"title":"外观NG上档数量（pcs）","required":true,"field":"AppearanceNgQtyA","type":"number"},
                               {"title":"外观NG中档数量（pcs）","required":true,"field":"AppearanceNgQtyB","type":"number"},
                               {"title":"外观NG下档数量（pcs）","required":true,"field":"AppearanceNgQtyC","type":"number"},
                               {"title":"外观NG总数量（pcs）","required":true,"field":"AppearanceNgQty","disabled":true,"type":"number"}],
                              [{"title":"尺寸NG总数量（pcs）","required":true,"field":"SizeNgQty","type":"number"},
                               {"title":"几何NG数量（pcs）","required":true,"field":"GeometryNgQty","type":"number"},
                               {"title":"形位NG数量（pcs）","required":true,"field":"FormNgQty","type":"number"}],
                              [{"title":"工残数量（pcs）","required":true,"field":"GongcanQty","type":"number"},
                               {"dataKey":"enabled","data":[],"title":"是否有报废记录","required":true,"field":"ScrapRecord","type":"select"},
                               {"title":"流失片数（pcs）","required":true,"field":"LossQty","disabled":true,"type":"number"},
                               {"title":"判定结果","required":true,"field":"JudgeResult","disabled":true}],
                              [{"title":"合格率（%）","required":true,"field":"QualifiedRate","disabled":true,"type":"decimal"},
                               {"title":"外观NG率（%）","required":true,"field":"AppearanceNgRate","disabled":true,"type":"decimal"},
                               {"title":"尺寸NG率（%）","required":true,"field":"SizeNgRate","disabled":true,"type":"decimal"},
                               {"title":"工残率（%）","required":true,"field":"GongCanRate","disabled":true,"type":"decimal"},
                               {"title":"流失率（%）","required":true,"field":"LossRate","disabled":true,"type":"decimal"}],
                              [{"title":"备注","field":"Remarks","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({"DianduNo":"","Repoter":"","DeviceNo":"","ProductId":"","Spec":"","Grade":"","IncomeQty":"","IncomeWeight":"","DoneQty":"","OkQty":"","OkQtyA":"","OkQtyB":"","OkQtyC":"","AppearanceNgQty":"","AppearanceNgQtyA":"","AppearanceNgQtyB":"","AppearanceNgQtyC":"","SizeNgQty":"","GeometryNgQty":"","FormNgQty":"","GongcanQty":"","LossQty":"","ScrapRecord":"","JudgeResult":"","QualifiedRate":"","AppearanceNgRate":"","SizeNgRate":"","GongCanRate":"","LossRate":"","CreateTime":""});
            const searchFormOptions = ref([[{"title":"电镀号","field":"DianduNo","type":"like"},{"title":"结单人","field":"Repoter","type":"like"},{"dataKey":"Ccd_DeviceNo","data":[],"title":"设备号","field":"DeviceNo","type":"="}],[{"title":"产品代码","field":"ProductId","type":"like"},{"title":"产品规格","field":"Spec","type":"like"},{"title":"产品性能","field":"Grade","type":"like"},{"title":"来料总数（pcs）","field":"IncomeQty","type":"="},{"title":"来料重量（kg）","field":"IncomeWeight","type":"="},{"title":"结单总数量（pcs）","field":"DoneQty","type":"="},{"title":"合格总数量（pcs）","field":"OkQty","type":"="}],[{"title":"合格上档数量（pcs）","field":"OkQtyA","type":"="},{"title":"合格中档数量（pcs）","field":"OkQtyB","type":"="},{"title":"合格下档数量（pcs）","field":"OkQtyC","type":"="},{"title":"外观NG总数量（pcs）","field":"AppearanceNgQty","type":"="},{"title":"外观NG上档数量（pcs）","field":"AppearanceNgQtyA","type":"="},{"title":"外观NG中档数量（pcs）","field":"AppearanceNgQtyB","type":"="},{"title":"外观NG下档数量（pcs）","field":"AppearanceNgQtyC","type":"="}],[{"title":"尺寸NG总数量（pcs）","field":"SizeNgQty","type":"="},{"title":"几何NG数量（pcs）","field":"GeometryNgQty","type":"="},{"title":"形位NG数量（pcs）","field":"FormNgQty","type":"="},{"title":"工残数量（pcs）","field":"GongcanQty","type":"="},{"title":"流失片数（pcs）","field":"LossQty","type":"="},{"dataKey":"enabled","data":[],"title":"是否有报废记录","field":"ScrapRecord","type":"like"},{"title":"判定结果","field":"JudgeResult","type":"like"}],[{"title":"合格率（%）","field":"QualifiedRate","type":"="},{"title":"外观NG率（%）","field":"AppearanceNgRate","type":"="},{"title":"尺寸NG率（%）","field":"SizeNgRate","type":"="},{"title":"工残率（%）","field":"GongCanRate","type":"="},{"title":"流失率（%）","field":"LossRate","type":"="}],[{"title":"创建时间/保存日期","field":"CreateTime","type":"date"}]]);
            const columns = ref([{field:"DianduNo",title:"电镀号",type:"string",sort:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Repoter",title:"结单人",type:"string",sort:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"DeviceNo",title:"设备号",type:"int",bind:{ key:"Ccd_DeviceNo",data:[]},sort:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"ProductId",title:"产品代码",type:"string",sort:true,width:120,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Spec",title:"产品规格",type:"string",sort:true,width:120,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Grade",title:"产品性能",type:"string",sort:true,width:120,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"IncomeQty",title:"来料总数（pcs）",type:"int",sort:true,width:120,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"IncomeWeight",title:"来料重量（kg）",type:"decimal",sort:true,width:120,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"DoneQty",title:"结单总数量（pcs）",type:"int",sort:true,width:120,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"OkQty",title:"合格总数量（pcs）",type:"int",sort:true,width:120,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"OkQtyA",title:"合格上档数量（pcs）",type:"int",sort:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"OkQtyB",title:"合格中档数量（pcs）",type:"int",sort:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"OkQtyC",title:"合格下档数量（pcs）",type:"int",sort:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"AppearanceNgQty",title:"外观NG总数量（pcs）",type:"int",sort:true,width:120,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"AppearanceNgQtyA",title:"外观NG上档数量（pcs）",type:"int",sort:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"AppearanceNgQtyB",title:"外观NG中档数量（pcs）",type:"int",sort:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"AppearanceNgQtyC",title:"外观NG下档数量（pcs）",type:"int",sort:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"SizeNgQty",title:"尺寸NG总数量（pcs）",type:"int",sort:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"GeometryNgQty",title:"几何NG数量（pcs）",type:"int",sort:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"FormNgQty",title:"形位NG数量（pcs）",type:"int",sort:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"GongcanQty",title:"工残数量（pcs）",type:"int",sort:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"LossQty",title:"流失片数（pcs）",type:"int",sort:true,width:120,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"ScrapRecord",title:"是否有报废记录",type:"string",bind:{ key:"enabled",data:[]},sort:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"JudgeResult",title:"判定结果",type:"string",sort:true,width:120,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"QualifiedRate",title:"合格率（%）",type:"decimal",sort:true,width:120,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"AppearanceNgRate",title:"外观NG率（%）",type:"decimal",sort:true,width:120,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"SizeNgRate",title:"尺寸NG率（%）",type:"decimal",sort:true,width:120,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"GongCanRate",title:"工残率（%）",type:"decimal",sort:true,width:120,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"LossRate",title:"流失率（%）",type:"decimal",sort:true,width:120,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效(0:否,1:是)",type:"int",width:120,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",sort:true,width:360,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建人ID",type:"bigint",width:120,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人名/结单人",type:"string",width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间/保存日期",type:"datetime",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改人ID",type:"bigint",width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人名",type:"string",width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Id",title:"键",type:"bigint",width:120,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"OkNoGapQty",title:"合格不分档总数量",type:"int",sort:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"AppearanceNgNoGapQty",title:"外观NG不分档总数量",type:"int",sort:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"SelectGapYN",title:"是否分档",type:"string",bind:{ key:"enabled",data:[]},sort:true,width:120,require:true,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
